package com.chenxiao.mybatisplus.controller;

import com.chenxiao.mybatisplus.entity.AjaxResult;
import com.chenxiao.mybatisplus.mq.RabbitmqProvider;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author: CX
 * @Date: Created in  2023/03/11 17:47
 * @version: v1.0
 * @Description: TODO
 **/
@RestController
@Api(tags = "消息推送端服务")
public class MqController {
    @Resource
    private RabbitmqProvider rabbitmqProvider;
    @PostMapping("/sendDirectMessage")
    @ApiModelProperty("发送消息")
    public AjaxResult sendDirectMessage() {
        rabbitmqProvider.sendDirectMessage();
        return new AjaxResult("200","成功");
    }
}
